package com.purchase.ml.bean.req.mail;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author :zxm
 * @date :2021/3/5 16:09
 * @description :some description
 **/
@Data
public class RePwdDto implements Serializable {

    @ApiModelProperty(value="邮箱")
    @NotBlank(message = "Emel tidak boleh kosong")
    @Pattern(regexp = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$",message = "Format emel salah")
    private String email;

    @NotBlank(message = "Kata laluan baru tidak boleh kosong")
    @Length(min = 6, message = "Kepanjangan kata laluan tidak kurang daripada 6 abjad")
    private String  newPwd;

    @NotNull(message = "Kod periksa tidak boleh kosong")
    private String code;
}
